package thomp;

import battlecode.common.RobotController;
import thomp.robots.Archon;
import thomp.robots.Soldier;

public class RobotPlayer {
    
    public static void run(RobotController myRC) {
        while (true) {
            try {
                
                // Movement / Attacking / Spawning...
                switch (myRC.getType()) {                    
                    case ARCHON:
                        new Archon(myRC).run(); break;                   
                    case DISRUPTER:
                        // TODO 
                        break;                        
                    case SCORCHER:
                        // TODO
                        break;                        
                    case SCOUT:
                        // TODO
                        break;                        
                    case SOLDIER:
                        new Soldier(myRC).run(); break;
                }
                                                           
                // Yield for the turn to end
                myRC.yield();                
                
            } catch (Exception e) {
                System.out.println("caught exception:");
                e.printStackTrace();
            }
        }
    }    
}
